﻿#include "PluginDesc.h"

namespace CVV
{

namespace Interface
{

PluginDesc::PluginDesc(QObject *parent)
    : QObject(parent)
{

}

PluginDesc::~PluginDesc()
{

}

PluginDesc::PluginDesc(const PluginDesc &pluginDesc)
{
    if (this == &pluginDesc)
    {
        return;
    }

    this->setObjectName(pluginDesc.objectName());
    this->m_Name = pluginDesc.Name();
    this->m_code = pluginDesc.code();
    this->m_version = pluginDesc.version();
    this->m_category = pluginDesc.category();
    this->m_params = pluginDesc.params();
    this->m_iconPath = pluginDesc.iconPath();
    this->m_categoryIcon = pluginDesc.categoryIcon();
    this->m_description = pluginDesc.description();
}

PluginDesc& PluginDesc::operator=(const PluginDesc &pluginDesc)
{
    if (this == &pluginDesc)
    {
        return *this;
    }

    this->setObjectName(pluginDesc.objectName());
    this->m_Name = pluginDesc.Name();
    this->m_code = pluginDesc.code();
    this->m_version = pluginDesc.version();
    this->m_category = pluginDesc.category();
    this->m_params = pluginDesc.params();
    this->m_iconPath = pluginDesc.iconPath();
    this->m_categoryIcon = pluginDesc.categoryIcon();
    this->m_description = pluginDesc.description();

    return *this;
}

QString PluginDesc::code() const
{
    return m_code;
}

void PluginDesc::setCode(const QString &code)
{
    m_code = code;
}

QString PluginDesc::Name() const
{
    return m_Name;
}

void PluginDesc::setName(const QString &Name)
{
    m_Name = Name;
}

QString PluginDesc::category() const
{
    return m_category;
}

void PluginDesc::setCategory(const QString &category)
{
    m_category = category;
}

QString PluginDesc::categoryIcon() const
{
    return m_categoryIcon;
}

void PluginDesc::setCategoryIcon(const QString &icon)
{
    m_categoryIcon = icon;
}

QString PluginDesc::version() const
{
    return m_version;
}

void PluginDesc::setVersion(const QString &version)
{
    m_version = version;
}

QJsonArray PluginDesc::params() const
{
    return m_params;
}

void PluginDesc::setParams(const QJsonArray &params)
{
    m_params = params;
}

QString PluginDesc::iconPath() const
{
    return m_iconPath;
}

void PluginDesc::setIconPath(const QString &iconPath)
{
    m_iconPath = iconPath;
}

QString PluginDesc::description() const
{
    return m_description;
}

void PluginDesc::setDescription(const QString &desc)
{
    m_description = desc;
}

}

}
